﻿Public Class RawViewVm
    Inherits KeyedViewModelBase

    Private mRawObjectVm As RawObjectVm

    Public Sub New()

    End Sub

    Public Sub New(obj As RawObject)
        mCancelCommand = New Command(AddressOf CloseWindow)

        mRawObjectVm = New RawObjectVm(obj) 'ObjectVmManager.Instance.GetObjectVm(obj)
        RawData = obj.WriteToString
    End Sub

    Public Property RawData As String = "This is some test data"

    Private mCancelCommand As ICommand
    Public ReadOnly Property OkCommand As ICommand
        Get
            Return mCancelCommand
        End Get
    End Property

    Public ReadOnly Property CancelCommand As ICommand
        Get
            Return Command.SimpleClosedCommand
        End Get
    End Property

    Private Sub CloseWindow(param As Object)
        SendMessage(New Messages.RawView.Close)
    End Sub
End Class
